<%--
  Created by IntelliJ IDEA.
  User: 花生
  Date: 2020/5/24
  Time: 15:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<script>
    var companyId=localStorage.getItem("Id");//得到id
    function xiugai() {
        var status=$("input[name='status']:checked").val();
        status= status == "启用" ? 1 : 0;
        var data={id:$("#id").val(),
            logo:$("#logo").val(),
            phone:$("#phone").val(),
            status: status,
            ad:$("#ad").val(),
            html:$("#html").val(),
            email:$("#email").val(),
            address:$("#address").val(),
            edition:$("#edition").val(),
    }
    $.ajax({
        url: '/CompanyUpdate',
        data: data,
        type: 'post',
        dataType: 'json',
        success:function (data) {
           if (data == 1){
               companychaxun();
        } else {
           alert("操作失败");
        }

        }
    })
</script>
<Form>
    <div>
        logo<input type="text" name="content" id="content">
    </div>
    <div>
        电话<input type="text" name="phone" id="phone">
    </div>
    <div>
        广告<input type="text" name="ad" id="ad">
    </div>
    <div>
        网址<input type="text" name="html" id="html">
    </div>
    <div>
        邮箱<input type="text" name="email" id="email">
    </div>
    <div>
        座机<input type="text" name="linePhone" id="linePhone">
    </div>
    <div>
        版本<input type="text" name="edition" id="edition">
    </div>
    <div>状态：<label><input type="radio" name="status" value="启用"> 启用</label>
        <label><input type="radio" name="status" value="停用">停用</label>
    </div>
    <div>
        <input type="button" value="提交" onclick="xiugai()">
    </div>
</Form>
</body>
</html>
